package com.jinke.api.modules.third.uniuni.model.response;

import com.alibaba.fastjson2.annotation.JSONField;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @projectName:
 * @title: UniUniResult
 * @description: uniuni返回公共结果
 * @see:
 * @author: hhp
 * @version: 1.0.0
 * @createTime: 2024/8/7 20:53
 */
@Data
public class UniResponse implements Serializable {
    private String status;
    @JSONField(name = "ret_msg")
    private String retMsg;
    @JSONField(name = "err_code")
    private Integer errCode;
    private Data data;

    @lombok.Data
    public static class Data {

        private String tno;
        private long order_id;
        private String uni_order_sn;
        private String uni_order_status;
        private int uni_status_code;
        private int sorting;
        private String source;
        private Order order;
        private Tracking tracking;
        private Spath spath;

        @JSONField(name = "access_token")
        private String accessToken;
        /**
         * token类型
         */
        @JSONField(name = "token_type")
        private String tokenType;
        /**
         * 作用域
         */
        private String scope;
        /**
         * 过期时间s
         */
        @JSONField(name = "expires_in")
        private Long expiresIn;

        private String status;
        private String errors;
        private String labelContent;
    }

    @lombok.Data
    public static class Order {

        private String start_consignee;
        private String partner_shop_name;
        private int partner_shop_id;
        private String start_email;
        private String start_mobile;
        private String start_address;
        private String start_zipcode;
        private int start_area;
        private String start_sign_building;
        private double start_lng;
        private double start_lat;
        private String consignee;
        private String address;
        private String zipcode;
        private int end_area;
        private String mobile;
        private String phone_extra;
        private String email;
        private String sign_building;
        private int transport_type;
        private String buzz_code;
        private String lng;
        private String lat;
        private String postscript;
        private String driver_notes;
        private int task_type;
        private String task_time;
        private int task_speed;
        private String extra_order_sn;
        private String referer;
        private String sub_referer;
        private String inv_type;
        private int warehouse;
        private int pickup_warehouse;
        private int type;
        private String shipping_staff_id;
        private String receive_time_label;
        private int fee;
        private int pay_fee;
        private int fee_per;
        private int need_insure;
        private int goods_value;
        private int insure_fee;
        private int need_box;
        private int need_call;
        private int distance;
        private BigDecimal shipping_fee;
        private int tax;
        private int pay_status;
        private int pay_id;
        private String pay_name;
        private int is_main_order;
        private int order_amount;
        private int user_id;
        private long add_time;
        private Date add_order_time;
        private int shop_id;
        private int partner_id;
        private int address_has_issue;
        private int is_accepted;
        private int carrier_id;
        private double shop_lat;
        private double shop_lng;
        private String shipping_name;
        private String customer_id;
        private int main_order_id;
        private String order_sn;
        private long order_id;
    }

    @lombok.Data
    public static class Tracking {

        private long order_id;
        private String order_sn;
        private String pathAddr;
        private String pathInfo;
        private int state;
        private String rcountry;
        private String tno;
        private int is_addon;
        private String second_delivery_sn;
        private String consignee;
        private String address1;
        private String shipper_country_code;
        private String city;
        private String province;
        private String province_code;
        private String country_code;
        private String zip;
        private int warehouse;
        private String segment;
        private String owner;
        private String grid_code;
        private String email;
        private String phone;
        private String reference;
        private String sub_reference;
        private String bag_no;
        private int goods_type;
        private int express_type;
        private int danger_type;
        private int weight_type;
        private int size_type;
        private String dispatch_type;
        private String item_description;
        private int require_signature;
        private int length;
        private int width;
        private int height;
        private double total_weight;
        private String weight_uom;
        private String dimension_uom;
        private String internal_account_number;
        private String total_value;
        private String currency;
        private long update_time;
        private int address_type;
        private String shipper;
        private boolean need_transshippment;
    }

    @lombok.Data
    public static class Spath {

        private long order_id;
        private int code;
        private String pathAddr;
        private long pathTime;
        private String pathInfo;
        private int traceSeq;


    }

}
